
<template tag="以下文档内容为hycli自动生成">
  <div>
   
    <!-- 关联需求 -->
    <el-dialog v-model="conf.aki_visible" 
      v-if="conf.aki_visible"   draggable
      title="关联需求" :close-on-click-modal="false"  width="60%"
      top="10vh" 
      :before-close="hide_aki">
    <el-form  ref="fm_aki" :model="form_aki" :rules="rules_aki">
    <el-row>
    </el-row>
    </el-form>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="hide_aki" icon="close">取消</el-button>
        <el-button type="primary" @click="save_aki" icon="select">提交</el-button>
      </span>
    </template>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data(){
    return{
      conf:{
        aki_visible:false,//关联需求
      },
      form_aki:{},//关联需求
      //关联需求
      rules_aki:{
      },
    }
  },
  methods:{
     //--------------------关联需求---------------------------------
      //显示 关联需求 弹出框
      show_aki(fm){
        //处理输入参数
        let currentForm = {}
        Object.assign(this.form_aki,currentForm)
        this.form_aki.plan_id = fm.plan_id
        this.form_aki.pr_id = fm.pr_id
        this.form_aki.pr_id = fm.pr_id
        //特殊参数处理
        this.form_aki.prstatus = "88"
        this.loadEnums_aki()
        this.conf.aki_visible = true;
      },

      //隐藏 关联需求 弹出框
      hide_aki(){
        this.conf.aki_visible = false;
        this.$refs.fm_aki.resetFields();
      },

      //保存 关联需求 弹出框数据
      save_aki(){
        let that = this
        this.$refs.fm_aki.validate((v=>{
          if(!v) return
          let post_form_aki = this.form_aki
          this.$theia.http.post("/ws/prod/design/relatepp",post_form_aki).then(res=>{
            that.$notify.success({title: '成功',message: '提交成功',duration:5000})
            that.$emit("onsaved")
            that.hide_aki()
            that.$theia.enum.clear("active_prod_requirement")
          }).catch(res=>{
            let code = ((res||{}).response||{}).status||0
            let msg= `提交失败(${code})`
            that.$notify.error({title: '失败',message:msg,duration:5000})
          })
      }))
    },
    //关联需求
    loadEnums_aki(){
    },

  },
}
</script>
<style scoped>
.form_item_info{
  margin-left: 4px;
  color:#999;
}
.form_item_info:hover{
  cursor: pointer;
  font-weight: 500;
  color:#333;
}
</style>